<section class="page-heading">
    <div class="container">
        <div class="row">
            <div class="col-md-6">
                <h1>Directory</h1>
            </div>
            <div class="col-md-6">
                <ul class="breadcrumb">
                    <li><a href="<?= base_url() ?>">Home</a></li>
                    <li class="active">Directory Utente</li>
                </ul>
            </div>
        </div>
    </div>
</section>
<section class="page-content">
    <div class="row" style="margin-bottom: 4px;">
        <h2 style="text-align: center;">Qui puoi trovare la lista ti tutti i Pet Sitter e Dog Sitter</h2>
        <div class="col-md-2"></div>
        <div class="col-md-2">
            <a href="<?= site_url('holidaydirectory/PetSitter') ?>" class="btn btn-primary">Pet Sitter</a>
        </div>
        <div class="col-md-2">
            <a href="<?= site_url('holidaydirectory/PetOwner') ?>" class="btn btn-info">Pet Owner</a>
        </div>
        <div class="col-md-2">
            <a href="<?= site_url('holidaydirectory/Pet') ?>" class="btn btn-success">Pet</a>
        </div>

    </div>
    <div class="container">

        <div class="row">



            <hr class="visible-sm visible-xs lg">
            <div class="content col-md-8">
                 
                <div class="job_listings" itemscope itemtype="http://schema.org/ItemList">
                    <ul class="job_listings">
                        <?php foreach ($users as $item): ?>
                        <li class="job_listing" itemprop="itemListElement" itemscope="" itemtype="http://schema.org/Person">
                                <?php if (isset($item['petsitter'])) { ?>
                                    <a href="<?= base_url() ?>profilo/petsitter/<?= $item['Id'] ?>">
                                    <?php } else { ?>
                                        <a href="<?= base_url() ?>profilo/petowner/<?= $item['Id'] ?>">
                                        <?php } ?>
                                        <div class="position">
                                            <h3 itemprop="name"><?= $item['Nome'] ?>&nbsp;<?= $item['Cognome'] ?></h3>

                                        </div>
                                            <div class="location" style="width: auto;" itemprop="address">
                                            <i class="fa fa-map-marker"></i> <?= $item['Indirizzo'] ?>, <?= $item['Citta'] ?>
                                        </div>
                                        <ul class="meta">
                                            <li class="date" itemprop="jobTitle" >
                                                <?php if (isset($item['petsitter'])) echo "Pet Sitter"; ?>
                                                <?php if (isset($item['petowner'])) echo "Pet Owner"; ?>
                                            </li>
                                        </ul>
                                    </a>
                            </li>
                        <?php endforeach; ?>
                    </ul>
                </div>
            </div>
            <aside class="sidebar col-md-3 col-md-offset-1 col-bordered">
                <!-- Widget :: Categories -->
            <div class="widget_categories widget widget__sidebar"itemscope itemtype="http://schema.org/ItemList">
                <h3 class="widget-title">Città Disponibili</h3>
                <div class="widget-content">
                    <ul>
                        <?php foreach ($city as $item): ?>
                        <li  itemprop="itemListElement" itemscope="" itemtype="http://schema.org/City"><a itemprop="name" href="<?= base_url() ?>holidaydirectory/Citta/<?= str_replace('\'','_',str_replace(' ', '_', $item['Citta'])) ?>"><?= $item['Citta'] ?></a></li>

                        <?php endforeach; ?>
                    </ul>
                </div>
            </div>
            </aside>
            

        </div>





        <div class="spacer"></div>


    </div>
</section>
<!-- Page Content / End -->
